#!/usr/bin/env pyhton

def b58(n):
    lookup = '123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ'
    r = []
    while n > 0:
        n, mod = divmod(n, 58)
        r.append(lookup[mod])
    print ''.join(reversed(r))

b58(4685948205)
